package ua.epam.java_bravo.data.dao;

import ua.epam.java_bravo.data.dto.HsWorktype;
import ua.epam.java_bravo.data.dto.pk.HsWorktypePk;
import ua.epam.java_bravo.data.exception.HsWorktypeDaoException;

public interface HsWorktypeDao {
    /**
     * Inserts a new row in the HS_WorkType table.
     */
    public HsWorktypePk insert(HsWorktype dto) throws HsWorktypeDaoException;

    /**
     * Updates a single row in the HS_WorkType table.
     */
    public void update(HsWorktypePk pk, HsWorktype dto) throws HsWorktypeDaoException;

    /**
     * Deletes a single row in the HS_WorkType table.
     */
    public void delete(HsWorktypePk pk) throws HsWorktypeDaoException;

    /**
     * Returns the rows from the HS_WorkType table that matches the specified primary-key value.
     */
    public HsWorktype findByPrimaryKey(HsWorktypePk pk) throws HsWorktypeDaoException;

    /**
     * Returns all rows from the HS_WorkType table that match the criteria 'workType_id = :worktypeId'.
     */
    public HsWorktype findByPrimaryKey(int worktypeId) throws HsWorktypeDaoException;

    /**
     * Returns all rows from the HS_WorkType table that match the criteria ''.
     */
    public HsWorktype[] findAll() throws HsWorktypeDaoException;

    /**
     * Returns all rows from the HS_WorkType table that match the criteria 'workType_id = :worktypeId'.
     */
    public HsWorktype[] findWhereWorktypeIdEquals(int worktypeId) throws HsWorktypeDaoException;

    /**
     * Returns all rows from the HS_WorkType table that match the criteria 'name = :name'.
     */
    public HsWorktype[] findWhereNameEquals(String name) throws HsWorktypeDaoException;

    /**
     * Sets the value of maxRows
     */
    public void setMaxRows(int maxRows);

    /**
     * Gets the value of maxRows
     */
    public int getMaxRows();

    /**
     * Returns all rows from the HS_WorkType table that match the specified arbitrary SQL statement
     */
    public HsWorktype[] findByDynamicSelect(String sql, Object[] sqlParams) throws HsWorktypeDaoException;

    /**
     * Returns all rows from the HS_WorkType table that match the specified arbitrary SQL statement
     */
    public HsWorktype[] findByDynamicWhere(String sql, Object[] sqlParams) throws HsWorktypeDaoException;

}
